import { Global, Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { ConfigurationService } from './services/configuration.service';

import { UtilityService } from './services/utility.service';
import { RedisService } from './services/redis.service';
import { CaptchaService } from './services/captcha.service';

@Global()
@Module({
    providers: [ConfigurationService, UtilityService,
        RedisService, CaptchaService,
    ], //先 providers ConfigurationService，在注入到其他模块
    exports: [ConfigurationService, UtilityService,
        RedisService, CaptchaService,
    ],
    imports: [
        ConfigModule.forRoot({ isGlobal: true }),
    ],
})

export class SharedModule {
}